<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>斐波那契数列</title>
</head>
<body>
	<script>
		var n = new Number(prompt('斐波那契数列的第几位'));
		function demo (n , ac1 = 1 , ac2 = 1) {
			if( n == 2 || n == 1) {
				return ac2
			};
			return demo(n - 1, ac2, ac1 + ac2);
		}
		console.log(demo(n))
	</script>
</body>
</html>